<template>
  <div class="navigation_bar_container">
    <div class="navigation_bar_wrapper">
      <div class="navigation_bar_content">
        <div><button v-if="this.$route.meta.leftButtonText"
        @click="onClickLeftbutton">{{this.$route.meta.leftButtonText}}</button></div>
        <div><slot name="center" :route="this.$route"></slot></div>
        <div><slot name="right_item"></slot></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  beforeMount(){
    console.log(this.$route)
  },
  methods:{
    onClickLeftbutton(){
      this.$route.meta.leftButtonAction();
    }
  }
}
</script>

<style scoped>
.navigation_bar_container
{
  width: 100%;
  height: 64px;
  position: fixed;
  left: 0px;
  top: 0px;
  background-color: white;
  border-bottom: 1px solid  #cccccc;
}

.navigation_bar_wrapper
{
  width: 100%;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.navigation_bar_content
{
  width: 90%;
  height: 100%;
  border: 1px solid red;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
}
</style>